package com.hob.openai.config;

import com.hob.openai.utils.OpenAiUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "openai")
public class OpenAiProperties implements InitializingBean {

    private String apiKey;
    private Integer timeout;

    @Override
    public void afterPropertiesSet() throws Exception {
        OpenAiUtils.OPENAPI_APIKEY = apiKey;
        OpenAiUtils.TIMEOUT = timeout;
    }
}
